/*
 * Emprunt.java
 *
 * Created on 17 avril 2007, 18:29
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package Entity;

import java.io.Serializable;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToOne;

/**
 * Entity class Emprunt
 * 
 * @author amo-yas
 */
@Entity
public class Emprunt implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private int idEnprunt;
    private String dureeEnprunt;
    private int dateEmprunt;
    private double montant;
    private double taux;
    private double capitalRestant;
    @OneToOne
    private Banque saBanque;
    /** Creates a new instance of Emprunt */
    public Emprunt() {
    }

    /**
     * Gets the id of this Emprunt.
     * @return the id
     */
    public int getId() {
        return this.getIdEnprunt();
    }

    /**
     * Sets the id of this Emprunt to the specified value.
     * @param id the new id
     */
    public void setId(int id) {
        this.setIdEnprunt(id);
    }

    /**
     * Returns a hash code value for the object.  This implementation computes 
     * a hash code value based on the id fields in this object.
     * @return a hash code value for this object.
     */

    public int getIdEnprunt() {
        return idEnprunt;
    }

    public void setIdEnprunt(int idEnprunt) {
        this.idEnprunt = idEnprunt;
    }

    public String getDureeEnprunt() {
        return dureeEnprunt;
    }

    public void setDureeEnprunt(String dureeEnprunt) {
        this.dureeEnprunt = dureeEnprunt;
    }

    public int getDateEmprunt() {
        return dateEmprunt;
    }

    public void setDateEmprunt(int dateEmprunt) {
        this.dateEmprunt = dateEmprunt;
    }

    public double getMontant() {
        return montant;
    }

    public void setMontant(double montant) {
        this.montant = montant;
    }

    public double getTaux() {
        return taux;
    }

    public void setTaux(double taux) {
        this.taux = taux;
    }

    public double getCapitalRestant() {
        return capitalRestant;
    }

    public void setCapitalRestant(double capitalRestant) {
        this.capitalRestant = capitalRestant;
    }

    public Banque getSaBanque() {
        return saBanque;
    }

    public void setSaBanque(Banque saBanque) {
        this.saBanque = saBanque;
    }
   
    
}
